Skip to content

Conversation

@zygoloid
Copy link
Contributor

Don't attempt to defer overload resolution by creating a
CppOverloadSet; this was incorrect as we weren't saving the complete
clang::OverloadCandidateSet, resulting in template candidates not being
found. Moreover, saving the overload candidate set would be expensive,
as the representation is surprisingly large, and is unnecessary since
we're about to build a call.

In passing, improve the diagnostics for overload resolution failure to
use Clang's operator overload resolution messages rather than its call
overload resolution messages.

This fixes calls to templated operator overloads, which is the final
piece needed for us to successfully compile an iostream-based "Hello
world" program.

Depends on #6413.

For now, treat such classes as being final, since we can't correctly
derive from them.
Don't attempt to defer overload resolution by creating a
`CppOverloadSet`; this was incorrect as we weren't saving the complete
clang::OverloadCandidateSet, resulting in template candidates not being
found. Moreover, saving the overload candidate set would be expensive,
as the representation is surprisingly large, and is unnecessary since
we're about to build a call.

In passing, improve the diagnostics for overload resolution failure to
use Clang's operator overload resolution messages rather than its call
overload resolution messages.

This fixes calls to templated operator overloads, which is the final
piece needed for us to successfully compile an iostream-based "Hello
world" program.
@zygoloid zygoloid requested a review from a team as a code owner November 21, 2025 03:11
@zygoloid zygoloid requested review from jonmeow and removed request for a team November 21, 2025 03:11
@zygoloid zygoloid added the dependent Depends on another issue/PR label Nov 21, 2025
@github-actions github-actions bot added documentation An issue or proposed change to our documentation toolchain labels Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependent Depends on another issue/PR documentation An issue or proposed change to our documentation toolchain

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant